import * as api from './util';


export function saveContacts(postbody) {
  return api.post('/applets/provider/customAccount/insert', postbody);
};

export function updateContacts(postbody) {
  return api.post('/applets/provider/customAccount/update', postbody);
};

export function removeContacts(postbody) {
  return api.get('/applets/provider/customAccount/delete', postbody);
};

//获取联系人关注订单列表
export function getContactsOrderList(postbody) {
  return api.post('/applets/provider/customAccount/order', postbody);
};

//客户联系人列表
export function contactsList(postbody) {
  return api.post('/applets/provider/customAccount/list', postbody);
};
 //历史记录
export function getRecentSearchContacts() {
  return api.get('/applets/provider/customUser/searchList');
};
//添加搜索记录
export function addSearchRecord(postbody){
  return api.post('/applets/provider/customUser/addSearchRecords', postbody);
};
//清空历史记录
export function clearSearchRecord() {
  return api.post('/applets/provider/customUser/deleteHistory', {});
};

//客户列表
export function getCustomContastsList(postbody) {
  return api.post('/applets/provider/customUser/list', postbody);
};
//客户联系人列表(短信推送用)
export function msgSendContactsList(postbody) {
  return api.post('/applets/provider/customAccount/allList', postbody);
};

export function contactsDetail(id) {
  return api.get('/applets/provider/customAccount/get', { id: id });
};

/**  
 * 短信推送
*/
export function messageSend(postbody) {
  return api.post('/applets/provider/shortMessage/insert', postbody);
};

//获取用户信息
export function updateSwitchInfo() {
  return api.get('/applets/provider/customUser/info');
}
